/**
 * Created by wenhui on 2017/2/9.
 */
angular.module('login.service',[])
  .service('loginService',['appItfAopService',function(appItfAopService){

      var loginData = { "staffId": "", "password": "", "randomNum": "", "chkrempwd": "no", "Loing_Key": "" };
    var params={
      "memberType":"",
      "staffId":"",
    };
    var VerificationCodeParams={
      "staffId":"",
      "SerialNumber":"",
      "staffIdChannel":"",
    };

    return {
      getLoginData:function(){
        return loginData;
      },
      setLoginData:function(staffId,password){
        loginData.staffId=staffId;
        loginData.password=password;
      },


      getParams:function()
      {
        return params;
      },
      getResp:function()
      {
        return resp;
      },
      doLogin:function(param){
        return appItfAopService.do_Login_req(param);
      },
      doMemberTypeCheck:function(param){
        return appItfAopService.do_queryMemberType_req(param);
        // return appItfService.do_validCust_req(params);
      },
      doGenerateSmsVerifyCode:function()
      {
        return appItfAopService.do_generateSmsVerifyCode_req(loginData);
      },
      doGerifySmsVerifyCode:function()
      {
        return appItfAopService.do_verifySmsVerifyCode_req(loginData);
      },
      /**
       * 检查版本更新
       * @returns {*}
       */
      doQueryLatestVersion:function()
      {
        return appItfAopService.do_queryLatestVersion_req();
      },
      //fim检测更新链接
      checkNewVersion:function(){
        return appItfAopService.query_newVersion_req();
      },
      //蒲公英检测更新链接
      GetDownLoadVersion:function(){
        return appItfAopService.get_pgyNewVersion_req();
      } 

    };
  }]);
